<style type="text/css">
.ajax_smilies img { margin:2px 0 2px 5px; cursor:pointer; }
</style>
<div class="mainrail">
    <form method="post"name="frm_topic" id="frm_topic" action="{url group/member/ac/reply/op/post/in_ajax/$_G[in_ajax]}">
    <table width="100%" cellspacing="0" cellpadding="0" class="maintable">
        <tr>
            <td width="410">
                <textarea name="content" id="topic_ajax_content" style="width:405px;height:120px;">$detail[content]</textarea>
            </td>
            <td width="*"><div class="ajax_smilies">
                    <!--{loop $smilies $value}-->
                    <img src="{URLROOT}/static/images/smilies/{$value}.gif" width="20" height="20" onclick="insert_smilies('topic_ajax_content','$value');" />
                    <!--{/loop}-->
            </div></td>
        </tr>
        <tr>
            <td colspan="2">
                <div id="reply_ajax_images_foo">
                    <span class="update-img-ico"><a href="javascript:;" onclick="discuss_topic_upimg('topic_ajax_content','reply_ajax_images_foo');">上传图片</a></span>
                    <span class="update-video-ico"><a href="javascript:;" onclick="group_topic_video('topic_ajax_content');">添加视频</a></span>
                </div>
                <!--{eval $pictures = is_serialized($detail[pictures]) ? unserialize($detail[pictures]) : array();}-->
                <!--{loop $pictures $key $val}-->
                <div class="upimg" id="frm_img_$key"><img src="{URLROOT}/$val" />
                    <input type="hidden" name="pictures[$key]" value="$val" />
                    <a href="javascript:void(0);" onclick="discuss_topic_insertimg('topic_ajax_content', '$key');">插入</a> | <a href="javascript:void(0);" onclick="$('#frm_img_$key').remove();return false;">删除</a>
                </div>
                <!--{/loop}-->
            </td>
        </tr>
    </table>
    <div class="text_center">
        <input type="hidden" name="edit" value="yes" />
        <input type="hidden" name="rpid" value="$rpid" />
        <button type="button" onclick="ajaxPost('frm_topic','$rpid','discussion_reply_reload');">提交</button>&nbsp;
        <button type="button" onclick="dlgClose();">关闭</button>
    </div>
    </form>
</div>